package com.itheima.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

//@WebListener
public class MyServletContextLoaderListener implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听上下文对象创建, 项目启动了, 加载配置文件了....");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
        System.out.println("监听上下文对象销毁, 项目关闭了, 释放资源....");
    }
}
